//
//  TinyTableViewCell.m
//  HappyNews
//
//  Created by lanou on 16/1/13.
//  Copyright © 2016年 BPWBANP. All rights reserved.
//

#import "TinyTableViewCell.h"

#import <UIImageView+WebCache.h>

@implementation TinyTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _imageF = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight / 4.5)];
        //_imageF.backgroundColor = [UIColor blueColor];
        
        [self.contentView addSubview:_imageF];
        
        
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, _imageF.bottom, kScreenWidth - 10, kScreenHeight / 15.8)];
        _titleLabel.numberOfLines = -1;
        _titleLabel.text = @"哈哈哈哈哈啊哈哈哈哈哈哈";
        //_titleLabel.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_titleLabel];
        
        
        _imageQ = [[UIImageView alloc]initWithFrame:CGRectMake(_imageF.right / 2 - 40, _imageF.bottom / 3.8, 80, 80)];
        
        _imageQ.image = [UIImage imageNamed:@"bofang"];
        
        //_imageQ.backgroundColor = [UIColor blackColor];
        
        [self.contentView addSubview:_imageQ];
        
        
    }
    return self;
}

- (void)setModel:(RecreationViewModel *)model
{
    [_imageF sd_setImageWithURL:[NSURL URLWithString:model.image] placeholderImage:nil];
    
    _titleLabel.text = model.title;
    
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
